const boxshangpin={
    props:['item'],

    template:`
    <div class="box-shangpin"  :value="item">
                <img :src='item.src' >
                <p>{{item.text}}{{item.prc}}(元)</p>
                <button class="btn" @click='addgoods(item)'>点击添加</button>
            </div>
    `,
    methods:{
      addgoods(item){
        this.$emit('addgoods-com',item)
      }
    }
  }
  const rightfloorone={
    props:['chanpinps'],
    template:`
    <div class="right-floor-one">
     <a href="#" @click='commonfood'>常点食品</a>
     <a href="#" @click='mainmenu'>主菜单</a>
     <div class="mystyle-two" :style="{left:chanpinps+'px'}"></div>
   </div>
    ` ,
    methods:{
     commonfood(){
       this.$emit('commonfood-com')
     },
     mainmenu(){
       this.$emit('mainmenu-com')
     }
    }


 }
 export {boxshangpin,rightfloorone}